-
Notifications
You must be signed in to change notification settings - Fork 32
🐛Ensure Dask client reference is uniquely defined for reference counting #7937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛Ensure Dask client reference is uniquely defined for reference counting #7937
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug in the Dask client reference counting by ensuring that the reference string is unique through the addition of a project identifier.
- Updated the Dask client reference string to include "project_id".
- Added "project_id" as a new parameter to relevant functions and updated client pool calls accordingly.
Comments suppressed due to low confidence (1)
services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler/_scheduler_dask.py:248
- The new formatting in _release_resources uses 'project_id' which is not defined in this scope. It should likely use 'comp_run.project_uuid' to ensure consistency with the other function calls.
ref=_DASK_CLIENT_RUN_REF.format(
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7937 +/- ##
===========================================
- Coverage 88.02% 69.82% -18.20%
===========================================
Files 1846 691 -1155
Lines 71224 32665 -38559
Branches 1220 176 -1044
===========================================
- Hits 62694 22808 -39886
- Misses 8179 9799 +1620
+ Partials 351 58 -293
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
@mergify queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 11846e3 |



What do these changes do?
A director-v2 replica keeps a dask-clients pool, each client is referenced counted since #7880.
The reference counting is using a reference that was defined using
user_idandrun_id. Therun_idis an integer which does not ensure uniqueness. This means that some clients could maybe get deleted before the need. This would explain why restarting the director-v2 would fix it.This PR fixes this issue by adding the
project_uuidinto the reference. Therefore it is now really unique.Related issue/s
How to test
Dev-ops